#ifndef GAMEENGINE_GAMEENGINE_DEFS_H
#define GAMEENGINE_GAMEENGINE_DEFS_H

//=================================================================================

#ifndef nil
	//! Define null pointers
	#define nil 0
#endif

//=================================================================================

// DLL stuff
#ifdef GAMEENGINE_DLL_IMPORT
//! Macro used to import template classes in the associated dll
#define _template_decl __declspec(dllimport)
#else
//! Macro used to export template classes in the associated dll
#define _template_decl __declspec(dllexport)
#endif

//! Macro used to export template class instantiations in DLLs
#ifdef GAMEENGINE_DLL_IMPORT
#define GAMEENGINE_DLL_CLASS(class_name) class_name
#else
#define GAMEENGINE_DLL_CLASS(class_name) template class _template_decl class_name; class_name
#endif

//! Macro used to force import/export of template STL class instantiations in DLLs
#define GAMEENGINE_FORCE_DLL_CLASS_STD(class_name,arg_name)\
	template class _template_decl std::allocator< arg_name >;\
	template class _template_decl std::class_name< arg_name, std::allocator< arg_name > >;\
	std::class_name< arg_name, std::allocator< arg_name > >

//! Macro used to export template STL class instantiations in DLLs
#ifdef GAMEENGINE_DLL_IMPORT
#define GAMEENGINE_DLL_CLASS_STD(class_name,arg_name) std::class_name< arg_name >
#else
#define GAMEENGINE_DLL_CLASS_STD(class_name,arg_name) GAMEENGINE_FORCE_DLL_CLASS_STD(class_name,arg_name)
#endif

//=================================================================================

// String stuff
// Note: most functions expect STL strings. The use of QStrings is thus not advised.
// //! Define strings as Qt strings
// #define QT_STRING // Comment to toggle STL / Qt strings. Note: compatibility with Qt strings is currently not maintained.

//=================================================================================

// Unit test stuff
//! Send a message after all the unit tests have been performed to indicate success or failure
#define GAMEENGINE_VERBOSE_UNIT_TESTS // Comment to toggle success / failure message after the unit tests

//! Activate the benchmarks in the unit tests
//#define GAMEENGINE_BENCHMARKS // Comment to toggle benchmarks

//=================================================================================

//! Toggle on the GameEngine namespace
#define GAMEENGINE_NAMESPACES // Comment to toggle namespaces
#ifndef GAMEENGINE_NAMESPACES
	// Note: if the program does not use namespaces, the GameEngine symbol is still
	//       defined to provide compatibility with namespace-based code.
	//       ---
	//       For instance, some code creating a GameEngine::Angle<float> object will still
	//       work without the GameEngine namespace.
	//       GameEngine::Angle<float> is then equivalent to ::Angle<float>
	#define GameEngine
#endif

//=================================================================================

#endif
